package DataConverters.DataReaders.readersImpl.defaultDataReader.LineReader;

import DataConverters.DataReaders.readersImpl.defaultDataReader.CharBuffer.CharBuffer;

/**
 * Created by IntelliJ IDEA.
 * User: Nobody
 * Date: 24.04.11
 * Time: 23:41
 * To change this template use File | Settings | File Templates.
 */
class LineBuilder {
    private final StringBuilder lineBuffer = new StringBuilder();

    public void append(char[] array) {
        lineBuffer.append(array);
    }

    public void append(CharBuffer buffer) {
        lineBuffer.append(buffer);
    }

    public void clear() {
        lineBuffer.delete(0, lineBuffer.length());
    }

    public char[] toCharArray() {
        return lineBuffer.toString().toCharArray();
    }

}
